# Maintainer:   

pkgname=libcacard
pkgver=2.7.0
pkgrel=3
pkgdesc='(Common Access Card) library thar provides emulation of smart cards to a virtual card reader running in a guest virtual machine'
arch=(loong64 x86_64)
license=(LGPL-2.1-or-later)
url='https://gitlab.freedesktop.org/spice/libcacard'
depends=(
  glib2
  glibc
  nspr
  nss
)
source=(https://www.spice-space.org/download/libcacard/libcacard-$pkgver.tar.xz{,.asc})
validpgpkeys=('F7DC50A57DFD52B94253295EF64907AC15B5C33D') #Jakub Jelen (work) <jjelen@redhat.com>
sha1sums=('85b85d33e5f2c68f3a792f09cae21de64edc91c0'
          'SKIP')
sha512sums=('347c13396e6777193e4e158321605410f4cbd90727c1ba8d85a1aac41d5ada96728dbef367ed4027d16dd0b10c8a4d0cf902ce3345334be4c78994cf72c58352'
            'SKIP')

build () {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  # prevent excessive overlinking due to libtool
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  make DESTDIR="$pkgdir" install -C $pkgname-$pkgver
}
